package com.hl.service;

import com.hl.mapper.ReplyMapper;
import com.hl.pojo.Reply;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReplyServiceImpl implements ReplyService{
    @Autowired
    private ReplyMapper replyMapper;

    @Override
    public Integer add(Reply r) {
        return replyMapper.add(r);
    }

    @Override
    public Integer update(Reply r) {
        return replyMapper.update(r);
    }

    @Override
    public Integer delete(Integer id) {
        return replyMapper.delete(id);
    }



    @Override
    public Reply findById(Integer id) {
        return replyMapper.findById(id);
    }

    @Override
    public List<Reply> findByQuestionId(Integer questionId){return replyMapper.findByQuestionId(questionId);};


    @Override
    public List<Reply> findByUserId(Integer userId) {
        return replyMapper.findByUserId(userId);
    }
    @Override
    public List<Reply> findAll() {
        return replyMapper.findAll();
    }
}
